namespace Maple.Branch.Base
{
    using Consts;
    using Volo.Abp.Authorization;
    using Volo.Abp.Localization;
    using Volo.Abp.Modularity;
    using Volo.Abp.MultiTenancy;

    [DependsOn(typeof(AbpLocalizationModule),
        typeof(AbpAuthorizationModule))]
    public class BranchCommonModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            Configure<AbpLocalizationOptions>(options =>
            {
                options.Languages.Clear();
                options.Languages.Add(new LanguageInfo("en", "en", "English"));
                options.Languages.Add(new LanguageInfo("zh-CN", "zh-CN", "简体中文"));
            });

            Configure<AbpMultiTenancyOptions>(options =>
            {
                options.IsEnabled = BranchConsts.IsMultiTenancyEnabled;
            });
        }
    }
}
